<template>
	<view class="purchase">
		<view class="head">
			<view class="search">
				<image @click="back" class="arrows" src="../../static/箭头左.png" mode=""></image>
				<input type="text" v-model="find" placeholder="找活、找工作" />
				搜索
			</view>
			<view class="classify">
				<view @click="showPopup" class="region">
					全国
					<image src="../../static/下箭头.png"></image>
					<my-tree :show="showAddress"></my-tree>
				</view>
				<view class="type">
					选择行业
					<image src="../../static/下箭头.png"></image>
				</view>
				<view class="recommend">
					选择阶段
					<image src="../../static/下箭头.png"></image>
				</view>
			</view>
		</view>
		<mescroll-body @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
			<view class="marge">
				<contact-way class="module"></contact-way>
				<view class="advisory">
					<view class="advisory-fish">鱼泡资讯：</view>
					<swiper vertical="true" :indicator-dots="false" :autoplay="true" :interval="3000" :duration="1000">
						<swiper-item>
							<view class="swiper-item">Aasdddddddddddddddddddddddddddddddddddddddddd</view>
						</swiper-item>
						<swiper-item>
							<view class="swiper-item">B</view>
						</swiper-item>
					</swiper>
				</view>
			</view>
			<view class="all">
				<view v-for="message in messages" :key="message.id">
					<view @click="goMessage">
						<view class="label">
							<view class="titel">
								测试
							</view>
							<view class="exhibition">
								<view class="addre-statu">
									<view class="address">宁德</view>
									<view class="address">中标</view>
								</view>
								<view class="time">
									2020-10-24
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
		</mescroll-body>
	</view>
</template>

<script>
	import mescrollMixin from '../../components/mescroll-uni/mescroll-mixins.js';
	import mescrollBody from '../../components/mescroll-uni/mescroll-body.vue';
	import contactWay from '../../components/contactway.vue';
	import drawPopup from '../../components/draw.vue';
	import myTree from '../../components/tree.vue'
	export default {
		data() {
			return {
				messages: [{
						id: 1,
						image: "../../static/首页ok_29-17.jpg",
						name: "李先生",
						address: "广州",
						time: "2020-10-15 10:03",
						status: "未成交"
					},

					{
						id: 2,
						image: "../../static/首页ok_29-17.jpg",
						name: "李先生",
						address: "广州",
						time: "2020-10-15 10:03",
						status: "未成交"
					},
				]
			}
		},
		components: {
			'mescrollBody': mescrollBody,
			'contactWay': contactWay,
			'drawPopup': drawPopup,
			'myTree': myTree
		},
		methods:{
			back() {
				uni.navigateBack()
			}
		}
	}
</script>

<style lang="scss" scoped>
	.purchase {
		width: 100vw;
		display: flex;
		flex-direction: column;
		background: #eaeaea;

		.head {
			width: 100vw;
			position: fixed;
			background: #0497ff;
			padding-top: 60rpx;
			z-index: 8;

			.search {
				display: flex;
				color: #FFFFFF;
				font-size: 32rpx;
				justify-content: space-between;
				align-items: center;
				margin-right: 30rpx;

				.arrows {
					width: 50rpx;
					height: 50rpx;

				}

				input {
					padding-right: 20rpx;
					padding-left: 10rpx;
					background-color: #FFFFFF;
					color: black;
					width: 60vw;
					border-radius: 10rpx;
					height: 60rpx;
				}
			}

			.classify {
				display: flex;
				justify-content: space-between;
				background: #FFFFFF;
				margin-top: 6rpx;
				align-items: center;
				width: 100vw;

				image {
					width: 30rpx;
					height: 30rpx;
					margin-left: 10rpx;
				}

				.region,
				.type,
				.recommend {
					display: flex;
					align-items: center;
					justify-content: center;
					width: 30vw;
					height: 6vh;
				}
			}
		}

		.marge {
			display: flex;
			flex-direction: column;
			background: #FFFFFF;
			border-radius: 40rpx 40rpx 0 0;
			margin: 20rpx 20rpx;
			margin-top: 220rpx;
			.advisory {
				height: 6vh;
				display: flex;
				margin-top: 10rpx;
				font-size: 26rpx;
				margin-left: 20rpx;

				.advisory-fish {
					color: #F0AD4E;
					line-height: 40rpx;
				}

				swiper {
					height: 4vh;
					width: 560rpx;

					.swiper-item {
						overflow: hidden;
						text-overflow: ellipsis;
					}
				}
			}
		}

		.all {
			display: flex;
			flex-direction: column;
			align-items: center;
			width: 100vw;
			padding: 30rpx;
		}

		.label {
			background: #FFFFFF;
			border-radius: 20rpx;
			padding: 20rpx;
			margin-bottom: 20rpx;
			width: 96vw;

			.titel {
				padding-bottom: 10rpx;
			}

			.exhibition {
				display: flex;
				justify-content: space-between;

				.addre-statu {
					display: flex;

					.address {
						border: solid 1px #ff0000;
						color: #ff0000;
						padding: 0 10rpx;
						margin-right: 10rpx;
						border-radius: 10rpx;
					}
				}
			}
		}
	}
</style>
